﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Feedback : System.Web.UI.Page
{
    FeedBack feedback;
    protected void Page_Load(object sender, EventArgs e)
    {
       feedback = (FeedBack)Session["Feedback"];
        if (!IsPostBack)
        {
            lbMessage.Text = feedback.message;

            switch(feedback.success)
            {
                case 1:
                        lbHeading.Text = "Successful";
                        lbHeading.ForeColor = System.Drawing.Color.LawnGreen;
                    break;
                case 0:
                        lbHeading.Text = "Failed";
                        lbHeading.ForeColor = System.Drawing.Color.Red;
                    break;
            }


        }
    }

    protected void  Button1_Click(object sender, EventArgs e)
    {
        Session.Remove("Feedback");
        Response.Redirect(feedback.lastPageURL);
    }


}